import request from '@/utils/request'

// 查询会员管理列表
export function listVip(query) {
  return request({
    url: '/teahouse/vip/list',
    method: 'get',
    params: query
  })
}

// 查询会员管理详细
export function getVip(id) {
  return request({
    url: '/teahouse/vip/' + id,
    method: 'get'
  })
}

// 新增会员管理
export function addVip(data) {
  return request({
    url: '/teahouse/vip',
    method: 'post',
    data: data
  })
}

// 修改会员管理
export function updateVip(data) {
  return request({
    url: '/teahouse/vip',
    method: 'put',
    data: data
  })
}

// 删除会员管理
export function delVip(id) {
  return request({
    url: '/teahouse/vip/' + id,
    method: 'delete'
  })
}
// 查询商品销量
export function getGoods(date) {
  return request({
    url: '/teahouse/vip/getGoods?date='+date ,
    method: 'get'
  })
}
// 查询销售统计
export function getPrices(date) {
  return request({
    url: '/teahouse/vip/getPrices?date='+date ,
    method: 'get'
  })
}